package com.atguigu.system.service;

import com.atguigu.model.system.SysUser;
import com.atguigu.model.vo.LoginVo;
import com.atguigu.model.vo.SysUserQueryVo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

/**
 * <p>
 * 用户表 服务类
 * </p>
 *
 * @author lemon
 * @since 2023-01-22
 */
public interface SysUserService extends IService<SysUser> {

    // 获取分页列表
    IPage<SysUser> selectPage(Page<SysUser> pageParam, SysUserQueryVo userQueryVo);

    // 更新状态
    void updateStatus(Long id, Integer status);

    // 保存用户
    void saveUser(SysUser user);

    // 进行登录
    String login(LoginVo loginVo, HttpServletRequest request);

    // 用户信息接口
    Map<String, Object> info(HttpServletRequest request);

    SysUser getUserInfoByUserName(String userName);

    // 登出
    void logout();
}
